<template>
  <div class="userInfo-head flex">
    <template>
      <div class="userInfo-head-photo">
        <img :src="userInfo.path" alt="" v-if="userInfo.path" />
        <img src="../assets/images/tx.png" alt="" v-else  />
      </div>
      <div class="userInfo-head-right flexColumn">
        <div class="userInfo-head-name font24 mbt10">{{userInfo.userName}}</div>
        
        <div class="userInfo-head-info flexItems mbt10">
          <span class="h33">{{userInfo.sexTxt}}</span>
          <span class="spLine" v-if="userInfo.telentTypeTxt && userInfo.sexTxt">|</span>
          <span class="h33">{{userInfo.telentTypeTxt}}</span>
          <span class="spLine" v-if="resource.topUniversity">|</span>
          {{resource.topUniversity}}
        </div>
        <div class="userInfo-head-speed flexItems">
          <span>{{$t('common.resume.completion')}} {{resource.completionRate || 0}}%</span>
          <router-link to="/vip/p_resume_edit" class="wanshanInfo">
            <i class="el-icon-edit-outline"></i>
            {{$t('common.company.improveInfo')}}
          </router-link>
        </div>
      </div>
    </template>
	</div>
</template>
<script>
import {ajaxAdd,getUserInfoData} from '@/utils/js.js';
import { getCurrentInfo, } from '@/services/api.js';
export default {
  name:'userInfo',
  props:{
    resource:{
      type:Object,
      default: ()=>{
        return {}
      }
    },
    imgs1:{
      type:String,
      default:''
    },
    imgs2:{
      type:String,
      default:''
    },
    renz:{
      type:Number,
      default:0
    }
  },
  data(){
    return {
      imgUrl:this.$store.state.imgUrl,
      userInfo:this.$store.state.userInfo
      
    } 
  },
  computed:{
  },
  watch:{
    
  },
  mounted(){
    getUserInfoData(this,userInfo=>{
      console.log('新的用户',userInfo)
      this.userInfo = userInfo
    })
  },
  // ******************* methods 开始 ****************** //
  methods:{
  }
  // ******************** methods结束 ***************** //
}
</script>

<style lang="scss">
  .userInfo-head{align-items: center;}
</style>